package easycloud.ecs.provider.snda.model;

import java.util.Date;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.snda.storage.service.model.CSObject;

import easycloud.ecs.api.model.IStorageObjectSummary;

public class SndaStorageObjectSummary implements IStorageObjectSummary {

	private CSObject objectSummary;

	public SndaStorageObjectSummary(CSObject objectSummary) {
		this.objectSummary = objectSummary;
	}

	@Override
	public String getETag() {
		return objectSummary.getETag();
	}

	@Override
	public String getKey() {
		return objectSummary.getName();
	}

	@Override
	public Date getLastModified() {
		return objectSummary.getLastModifiedDate();
	}

	@Override
	public long getSize() {
		return objectSummary.getContentLength();
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
